Configuration cDscClientAddManagedServer
{
    param(
	[Parameter(Mandatory)]
	[ValidateNotNullOrEmpty()]
	[String]$ServerName,

	[Parameter(Mandatory)]
	[ValidateNotNullOrEmpty()]
	[PSObject]$ManagedServer

    )


    Import-DscResource -ModuleName cDscClient -Name MESF_cDscClientAddPsModuleFolder
    #Log Message
    Log StartConfiguration {
        Message = "Start cDscClientAddManagedServer for $($ManagedServer.Name)"
    } 

    # Add psmodule Folder for DscResources Folder
    cDscClientAddPsModuleFolder addPsModuleFolder {
        ServerName = $ServerName
        ToolFolder = $ManagedServer.RootFolders["ToolsFolder"]
        PowershellFolder = $ManagedServer.PowershellFolders["DscResourcesFolder"]
        
    }
        
    # Add psmodule Folder for DscResources Folder
    cDscClientAddPsModuleFolder addPsModuleFolder2 {
        ServerName = $ManagedServer.Name
        ToolFolder = $ManagedServer.RootFolders["ToolsFolder"]
        PowershellFolder = $ManagedServer.PowershellFolders["DscResourcesFolder2"]
        
    } 

    Log EndConfiguration {
        Message = "End cDscClientAddManagedServer for $($ManagedServer.Name)"
    } 

}

<#
$toolFolder = New-Object PSObject -Property @{
                                         UniqueKey="ToolsFolder"
                                         Path="D:\Devel\DebugDsc\ToolsFolder"
                                        }


$powershellFolder = New-Object PSObject -Property @{
                                          UniqueKey="DscResourcesFolder"
                                          Path="D:\Devel\DebugDsc\DscResourcesFolder"
                                          ArchiveSourcePath="\\SANS-VGA\BinariesRepository\nssm-2.23.zip"
                                        }

$powershellFolder2 = New-Object PSObject -Property @{
                                          UniqueKey="DscResourcesFolder2"
                                          Path="D:\Devel\DebugDsc\DscResourcesFolder2"
                                          ArchiveSourcePath="\\SANS-VGA\BinariesRepository\nssm-2.23.zip"
                                        }


$Server = New-Object psobject -Property @{
                                        Name="sans-vga"
                                        RootFolders= @{}
                                        PowershellFolders = @{}
                                        }

$Server.RootFolders.Add($toolFolder.UniqueKey, $toolFolder)
$Server.PowershellFolders.Add($powershellFolder.UniqueKey, $powershellFolder)
$Server.PowershellFolders.Add($powershellFolder2.UniqueKey, $powershellFolder2)


cDscClientAddManagedServer -ManagedServer $Server -OutputPath D:\devel\dsc\cDscClientAddManagedServer
#cDscClientAddPsModuleFolder -ToolFolder $toolFolder -PowershellFolder $powershellFolder -OutputPath D:\devel\dsc\cDscClientAddPsModuleFolder

#>